package com.youshang520i.demo;

import org.springframework.context.annotation.Conditional;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 使用@Conditional 加载一个特定的Condition实现
 * 通过特定的Condition判断返回 true || false 从而是否需要加载当前配置
 */
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Conditional(OnBeanCondition.class)
public @interface LocalConditionalOnBean {
    String value() default "";
}